package com.xuecheng.api.media;

import com.xuecheng.api.media.dto.MediaDTO;
import com.xuecheng.api.media.qo.QueryMedia;
import com.xuecheng.api.media.vo.MediaVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.common.domain.response.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <h4>xuecheng</h4>
 * <p></p>
 *
 * @author : by wujianming
 * @date : 2021-12-14 21:00
 **/
@Api("媒资信息")
public interface MediaApi {
    @ApiOperation("保存媒资信息")
    MediaDTO saveMedia(MediaVO mediaVO);

    @ApiOperation("媒资信息分页查询")
    PageVO queryMediaList(PageRequestParams page, @RequestBody QueryMedia media);

    @ApiOperation("获取媒资预览信息")
    @ApiModelProperty(name = "mediaId",value = "媒资id",required = true,dataType = "path")
    String previewMedia(Long mediaId);


    @ApiOperation("删除媒资信息")
    @ApiModelProperty(name = "mediaId",value = "媒资id",required = true,dataType = "path")
    void deleteMedia(Long mediaId);

    @ApiOperation("根据Id查询媒资信息")
    @ApiImplicitParam(name = "mediaId",
            value = "媒资ID", required = true,
            dataType = "long", paramType = "path", example = "1")
    RestResponse getMediaById(Long mediaId);
}
